package com.fr.report.script.function;

import com.fr.report.script.Function;
import com.fr.report.script.Function.Type;
import com.fr.report.script.NormalFunction;
import com.fr.report.script.Primitive;

public class SINH extends NormalFunction
{
  public Object run(Object[] paramArrayOfObject)
  {
    if (paramArrayOfObject.length < 1)
      return Primitive.ERROR_NAME;
    Object localObject = paramArrayOfObject[0];
    if (localObject instanceof Number)
    {
      double d = ((Number)localObject).doubleValue();
      return new Double((Math.pow(2.718281828459045D, d) - Math.pow(2.718281828459045D, -d)) / 2.0D);
    }
    return Primitive.ERROR_NAME;
  }

  public Function.Type getType()
  {
    return Function.MATH;
  }

  public String getCN()
  {
    return "SINH(number):返回某一数字的双曲正弦值。\nnumber:为任意实数。\n示例:\nSINH(1) 等于 1.175201194\nSINH(-1) 等于 -1.175201194";
  }

  public String getEN()
  {
    return "SINH(number): Returns the hyperbolic sine of a number.\nnumber is any real number.\n\nExample:\n   SINH(1) = 1.175201194\n   SINH(-1) = -1.175201194";
  }
}